#!/bin/bash
git pull
PID=$(lsof -t -i:3060)
if [ ! -z "$PID" ]; then
    echo "Killing process on port 3060 with PID $PID"
    kill -9 $PID
else
    echo "No process running on port 3060"
fi
echo "Starting the Python program in the background"
sudo nohup python3 ./job_flask/runser.py > logfile.out 2>&1 &
